package com.example.main.thread;

public class TraditionalThreadExample {
    public static void main(String[] args) {
        int numberOfThreads = 10_000; // 创建1万个线程

        for (int i = 0; i < numberOfThreads; i++) {
            Thread thread = new Thread(() -> {
                System.out.println("Traditional Thread: " + Thread.currentThread().getName());
            });
            thread.start();
        }

        System.out.println("Main thread finished with traditional threads.");
    }
}
